import re

log_data = """
[INFO] 2023-01-01 10:00:00 Another log entry
[INFO] 2023-01-01 10:00:00 System started
[ERROR] 2023-01-01 10:05:23 Connection failed
[WARNING] 2023-01-01 10:06:10 Low disk space
[ERROR] 2023-01-01 10:00:00
    Error details: Connection timeout
    Stack trace:
        at com.example.App.main(App.java:10)
[INFO] 2023-01-01 10:10:00 Backup completed
[ERROR] 2023-01-01 10:05:23 Connection failed1
"""

p = re.compile(r"^\[ERROR\].*?(?=\[|\Z)", re.MULTILINE | re.DOTALL)
result = p.findall(log_data)
for item in result:
    print(item)
